package com.hzlx.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzlx.bean.Inventory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface InventoryDao extends BaseMapper<Inventory> {
    @Update("update smd_inventory set quantity=quantity-#{quantity} where sku=#{sku} and quantity > #{quantity} ")
    void update(Inventory inventory);
}
